package ai.people.netmon.framework.domain.archives.vo;

import ai.people.netmon.framework.domain.archives.entity.GangGroupInfo;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 团伙返回VO
 *
 * @author zhenglin
 * @date 2022/06/21
 */
@Data
@NoArgsConstructor
public class GangGroupListVO {
    /**
     * 主键ID
     */
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;
    /**
     * 团伙名称
     */
    private String groupName;
    /**
     * 团伙照片
     */
    private String groupPicture;

    /**
     * 信息
     */
    private String info;

    /**
     * 创建者账号
     */
    private String creatorName;
    /**
     * 活动地区
     */
    private List<String> activeRegion;
    /**
     * 团伙人数
     */
    private String groupPeopleCount;

    /**
     * 危险程度
     */
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer degreeOfDanger;

    /**
     * 标签
     */
    private List<String> tags;

    public GangGroupListVO(GangGroupInfo record) {
        this.id = record.getId();
        this.groupName = record.buildGroupNameFirst();
        this.groupPicture = record.buildGroupPictureFirst();
        this.info = record.buildInfoFirst();
        this.creatorName = record.getCreatorName();
        this.activeRegion = record.buildActiveRegionList();
        this.groupPeopleCount = record.getGroupPeopleCount();
        this.degreeOfDanger = record.getDegreeOfDanger();
        this.tags = record.buildTagsList();
    }
}
